package com.android.monee.view.binding.widget;

import com.android.monee.binding.Field;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.EditText;
import android.widget.TextView;

public class BindableEditText extends EditText {

	public BindableEditText(Context context) {
		super(context);
	}

	public BindableEditText(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public BindableEditText(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	public class Text implements Field<BindableEditText, String>{

		@Override
		public String get(BindableEditText obj) {
			return obj.getText().toString();
		}

		@Override
		public void set(BindableEditText obj, String val) {
			obj.setText(val);			
		}
		
	}
}
